package com.demo;

import com.okhttp.annotations.ApiResponseHandler;
import com.okhttp.annotations.ApiGenerateService;
import com.okhttp.retrofit.BaseResponseBodyHandler;
import com.okhttp.retrofit.BaseResponseHandler;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

@ApiGenerateService(Callback.class)
public interface Net {


  /**
   * Test 测试文档注释
   * @param test
   * @param data
   * @return
   */
  @FormUrlEncoded
  @POST("city")
  public Call<DataBean> doGet1(@Field("postTest") String test,@Field("postTest") DataBean data);

  @FormUrlEncoded
  @POST("city")
  public Call<DataBean> doGet2(@Field("postTest") String test);

  @ApiResponseHandler(
      //handler= BaseResponseHandler.class,
      genericity = DataBean.class
      )
  @FormUrlEncoded
  @POST("city")
  public Call<Result<DataBean>> doGet3(@Field("postTest") String test);

  @ApiResponseHandler(
      handler= BaseResponseHandler.class
  )
  @FormUrlEncoded
  @POST("city")
  public Call<Result<DataBean>> doGet4(@Field("postTest") String test);

  @ApiResponseHandler(
      handler= ResultHandler.class,
      genericity = DataBean.class
  )
  @FormUrlEncoded
  @POST("city")
  public Call<Result<DataBean>> doGet5(@Field("postTest") String test);

  @FormUrlEncoded
  @POST("city")
  public Call<ResponseBody> doGet6(@Field("postTest") String test);

  @ApiResponseHandler(
      handler= Callback.class,
      genericity = DataBean.class
  )
  @FormUrlEncoded
  @POST("city")
  public Call<ResponseBody> doGet7(@Field("postTest") String test);

  @ApiResponseHandler(
      handler= BaseResponseBodyHandler.class,
      genericity = DataBean.class
  )
  @FormUrlEncoded
  @POST("city")
  public Call<ResponseBody> doGet8(@Field("postTest") String test);

  @ApiResponseHandler(
      handler= ResultHandler.class
  )
  @FormUrlEncoded
  @POST("city")
  public Call<Result<DataBean>> doGet9(@Field("postTest") String test);


  @ApiResponseHandler(
      isGenerate= false
  )
  @FormUrlEncoded
  @POST("city")
  public Call<Result<DataBean>> doGet10(@Field("postTest") String test);

}
